Over 100 million patients undergo surgery each year in the US, and more than 60% of these patients will suffer from severe acute postoperative pain. Recent data suggest that the time course of pain resolution following surgery is highly variable with over one-third of patients experiencing stable or increasing, rather than decreasing, pain on each day after surgery for at least the first 7 postoperative days. While prior work has focused on linear trajectories of average daily postoperative pain, temporal profiles of pain that measure hourly variations in pain intensity provide a more accurate depiction of the postoperative pain experience than simple linear functions derived from daily pain assessments. The purpose of the proposed research is to elucidate the nature, mechanistic underpinnings, and clinical implications of TEMporal PostOperative pain Signatures (TEMPOS) by applying advanced algorithms to characterize postoperative pain profiles in a prospective cohort. The research will address three Specific Aims: Specific Aim 1: To characterize TEMPOS within the surgical population via state of the art time-series analysis techniques; Specific Aim 2: To identify clinical, biological, psychological, and social (CBPS) mechanisms that contribute to TEMPOS; Specific Aim 3: To determine which TEMPOS optimally predict the development of persistent postsurgical pain. To address these aims, we propose a single-center, prospective observational cohort study of 500 surgical patients. Prior to surgery, sociodemographic variables will be obtained via the electronic medical record (EMR), and patients will complete multiple online inventories for depression, anxiety and catastrophizing. A blood sample will be obtained for genetic studies exploring a variety of pain-related genes, and perioperative surgery and anesthetic details will be extracted from the EMR. Pain outcomes will be assessed at three resolutions: every 6 minutes via a patient-controlled analgesia device interrogation; every four hours via clinical assessments; and every day using the McGill Pain Questionnaire and Brief Pain Inventory. Clinical data on analgesic consumption and patient activity will be used for contextual assessment of pain intensity. Patients will be followed for up to 7 days after surgery, and will again be queried at 6 months after surgery to determine the presence and extent of persistent postsurgical pain. Analyses will first compare existing models, which classify patients as positive, neutral, or negative in pain trajectory slope, with higher-order models offering greater resolution in predicting postoperative pain at discrete time points. We will then perform clustering analyses with respect to the temporal patterns of postoperative pain in order to better define TEMPOS phenotypes. These analyses will be repeated with the clinical, biological, psychological, and social factors listed above to determine how these characteristics drive the mechanisms underlying the observed TEMPOS. Finally, we will use advanced machine learning models to forecast both acute and persistent postoperative pain outcomes with respect to the derived TEMPOS definitions.